package api

import (
	"github.com/gin-gonic/gin"
	"zy7/api/handler"
)

func Router(r *gin.Engine) {
	api := r.Group("/api")
	{
		user := api.Group("/user")
		{
			//user.Use(pkg.JWTAuth("2201a"))
			user.POST("/register", handler.UserRegister)
			user.POST("/login", handler.UserLogin)
			user.POST("/list", handler.UserList)
			user.POST("/remove", handler.UserRemove)
		}
		chat := api.Group("/chat")
		{
			chat.POST("/upload", handler.Upload)
		}
	}
}
